require File.dirname(__FILE__) + '/volume'

availability_zone = ARGV[0]
size = ARGV[1]
snapshot_id = ARGV[2]
nickname = ARGV[3]
description = ARGV[4]
server_id = ARGV[5]
device = ARGV[6]
timeout = ARGV[7].to_i

volume = Volume.new

volume_id = volume.create_from_snapshot(availability_zone, size, snapshot_id,
    nickname, description, timeout)

puts "rightscale volume_id = #{volume_id}"

volume.attach_to_server(volume_id, server_id, device, true)










